<?php
namespace app\admin\controller;

use app\admin\service\LoginService;
use app\common\AppController;


class Login extends AppController
{
    // 登录页面
    public function index()
    {
        return view('', [
            'background' => 'https://open.saintic.com/api/bingPic/?picSize=2',
        ]);
    }

    // 登录请求
    public function login()
    {
        if ($this->isAjax())
        {
            $request = request()->param();
            LoginService::login($request);
            return $this->success([], 0, '登录成功');
        }
    }
}
